// noipNOI

#include <bits/stdc++.h>

using namespace std;
const int MAXN = 2e5 + 5;
int n, m, k;
int h[MAXN], b[MAXN];

int main() {
  cin>> n>>m>>k;
  for (int i = 1; i <= n; ++i)
    cin>> h[i];
  for (int i = 1; i <= m; ++i)
    cin>> b[i];
  sort(h + 1, h + n + 1);
  sort(b + 1, b + m + 1);
  // h[1..k] <= b[m-k+1...m]
  for (int i = 1; i <= k; ++i) {
    if (h[i] > b[m - k + i]) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}